package com.ellricky.baselib.adapter.task;


import com.andr.common.ui.adapter.BaseRecyclerAdapter;
import com.andr.common.ui.adapter.SmartViewHolder;
import com.andr.common.util.StrUtil;
import com.ellricky.baselib.R;
import com.ellricky.baselib.entity.task.PreLessonEntity;

public class PreLessonAdapter extends BaseRecyclerAdapter<PreLessonEntity> {

    public PreLessonAdapter() {
        super(R.layout.base_adapter_common_list);
    }

    @Override
    protected void onBindViewHolder(SmartViewHolder vh, PreLessonEntity p1, int i) {
        String preName = "";
        if (!StrUtil.isEquals("0", p1.getPreStatus())) preName = "(已备课)";

        vh.text(R.id.tvTitle,
                StrUtil.filterEmpty(p1.getClassName()) + preName
        );

        vh.text(R.id.tvKey, "");
        vh.text(R.id.tvValue, "");
        vh.text(R.id.tvDateKey, "");
        vh.text(R.id.tvDate, p1.getClassTypeName());
    }
}
